{% if links['document_uri'] %}
.. _lr-{{ code }}:

{{ title }}
{{ "="*(title | length)*2 }}

**/{{ code }}**

*TODO*


{% if 'GET' in links['document_methods'] %}
.. _lr-{{ code }}-read:

读取
++++

HTTP Request
------------

::

{% if 'GET-' not in links['document_methods'] %}
 GET {{ links['document_uri'] | replace('{CODE}', code) }}
{% endif %}
{% if 'GET' in links['document_uris'] %}
{% for uri in links['document_uris']['GET'] %}
 GET {{ uri | replace('{CODE}', code) }}
{% endfor %}
{% endif %}

Template Variable
-----------------

*TODO*

Response
--------

 :ref:`r-{{ code }}`

Remarks
-------

*TODO*

Error Codes
~~~~~~~~~~~

*TODO*

Example
~~~~~~~

*TODO*

Request
_______

*TODO*

Response
________

*TODO*

See Also
--------

*TODO*
{% endif %}

{% if 'PATCH' in links['document_methods'] %}
.. _lr-{{ code }}-update:

更新
++++

HTTP Request
------------

::

{% if 'PATCH-' not in links['document_methods'] %}
 PATCH {{ links['document_uri'] | replace('{CODE}', code) }}
{% endif %}
{% if 'PATCH' in links['document_uris'] %}
{% for uri in links['document_uris']['PATCH'] %}
 PATCH {{ uri | replace('{CODE}', code) }}
{% endfor %}
{% endif %}

Request Body
------------

::

 {
{% for column in columns %}
{% if not loop.last %}
   "{{ column[1]}}": "{{ column[2] }}",  # {{ column[0] }}
{% else %}
   "{{ column[1]}}": "{{ column[2] }}"  # {{ column[0] }}
{% endif %}
{% endfor %}
 }

Request Body Fields
-------------------

{% for column in columns %}
* **{{ column[1] }}**

 {{ column[0] }}

{% endfor %}
Response
--------

 :ref:`r-{{ code }}`

Remarks
-------

*TODO*

Error Codes
~~~~~~~~~~~

*TODO*

Example
~~~~~~~

*TODO*

Request
_______

*TODO*

Response
________

*TODO*

See Also
--------

*TODO*
{% endif %}

{% if 'DELETE' in links['document_methods'] %}
.. _lr-{{ code }}-delete:

删除
++++

HTTP Request
------------

::

{% if 'DELETE-' not in links['document_methods'] %}
 DELETE {{ links['document_uri'] | replace('{CODE}', code) }}
{% endif %}
{% if 'DELETE' in links['document_uris'] %}
{% for uri in links['document_uris']['DELETE'] %}
 DELETE {{ uri | replace('{CODE}', code) }}
{% endfor %}
{% endif %}

Remarks
-------

*TODO*

Error Codes
~~~~~~~~~~~

*TODO*

Example
~~~~~~~

*TODO*

Request
_______

*TODO*

Response
________

*TODO*

See Also
--------

*TODO*
{% endif %}
{% endif %} {# End document #}

{% if links['document_uri'] and links['collection_uri'] %}
#####
{% endif %}

{% if links['collection_uri'] %}
.. _lr-{{ code }}-c:

{{ title }}集合
{{ "="*(title | length)*2 }}====

**/{{ code }}**

*TODO*


{% if 'POST' in links['collection_methods'] %}
.. _lr-{{ code }}-create:

创建
++++

HTTP Request
------------

::

{% if 'POST-' not in links['collection_methods'] %}
 POST {{ links['collection_uri'] | replace('{CODE}', code) }}
{% endif %}
{% if 'POST' in links['collection_uris'] %}
{% for uri in links['collection_uris']['POST'] %}
 POST {{ uri | replace('{CODE}', code) }}
{% endfor %}
{% endif %}

Request Body
------------

::

 {
{% for column in columns %}
{% if not loop.last %}
   "{{ column[1]}}": "{{ column[2] }}",  # {{ column[0] }}
{% else %}
   "{{ column[1]}}": "{{ column[2] }}"  # {{ column[0] }}
{% endif %}
{% endfor %}
 }

Request Body Fields
-------------------

{% for column in columns %}
* **{{ column[1] }}**

 {{ column[0] }}

{% endfor %}
Response
--------

 :ref:`r-{{ code }}`

Remarks
-------

*TODO*

Error Codes
~~~~~~~~~~~

*TODO*

Example
~~~~~~~

*TODO*

Request
_______

*TODO*

Response
________

*TODO*

See Also
--------

*TODO*
{% endif %}


{% if 'GET' in links['collection_methods'] %}
.. _lr-{{ code }}-read-c:

读取
++++

HTTP Request
------------

::

{% if 'GET-' not in links['collection_methods'] %}
 GET {{ links['collection_uri'] | replace('{CODE}', code) }}
{% endif %}
{% if 'GET' in links['collection_uris'] %}
{% for uri in links['collection_uris']['GET'] %}
 GET {{ uri | replace('{CODE}', code) }}
{% endfor %}
{% endif %}

Template Variable
-----------------

*TODO*

Response
--------

 :ref:`r-{{ code }}-c`

Remarks
-------

*TODO*

Example
~~~~~~~

*TODO*

Request
_______

*TODO*

Response
________

*TODO*

See Also
--------

*TODO*
{% endif %}
{% endif %} {# End collection #}
